<template>
    <div class="GoogleEarthEnterpriseImageryProvider">
        <cesium-viewer @viewerAlready="viewerAlready">
        </cesium-viewer>
    </div>
</template>

<script>
    import CesiumViewer from "../../CesiumViewer";
    import {addAdditionalLayerOption} from "../../../utils/layersHandler";
    export default {
        name: "GoogleEarthEnterpriseImageryProvider",
        //import引入的组件需要注入到对象中才能使用",
        components: {CesiumViewer},
        data() {
            //这里存放数据",
            return {}
            },
        //方法集合",
        methods: {
            viewerAlready() {
                let geeMetadata = new GoogleEarthEnterpriseMetadata('http://www.earthenterprise.org/3d');
                addAdditionalLayerOption(
                    //使用Google Earth Enterprise REST API提供平铺的图像。
                    // 注意:此提供程序可与Google Earth Enterprise的3D Earth API一起使用，
                    // GoogleEarthEnterpriseMapsProvider 应该与2D Maps API一起使用。
                    "GoogleEarthEnterpriseImageryProvider",
                    new Cesium.GoogleEarthEnterpriseImageryProvider({
                        metadata : geeMetadata
                    })
                )
            }
        }
    }
</script>

